home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / objcissu.lha / multiple-threads < prev    next >
Internet Message Format  |  1993-03-01  |  4KB

  1. Date: Thu, 10 Sep 1992 15:12:40 -0700
  2. From: Bruce Nilo <bruce@ictv.com>
  3. To: gnu-objc@prep.ai.mit.edu
  4. Subject: Re: Your mission, should you choose to accept it. . .
  5.  
  6. [moved PROTOCOL IMPROVEMENT]
  7. [moved ERROR HANDLING]
  8.  
  9. BETTER RUNTIME SUPPORT FOR MULTI-THREADED PROGRAMS
  10.  
  11. Practically every program I have written on the NeXT has either been
  12. explicitly or implicitly multi-threaded. Any OS which supports
  13. multi-tasking within the same address space should at least attempt to
  14. support a runtime system which does not penalize the use of multiple
  15. threads. Even if this cannot be done transparently, low level runtime
  16. calls could be made to set up private thread caches etc. Using a
  17. hammer to provide thread safety, such as providing a semaphore on a
  18. global cache, should be used only if it is reasonably certain that
  19. this approach has message dispatching performance competitive with
  20. other implementations.
  21.  
  22. Perhaps NeXT's approach is a near optimal solution. I find this hard
  23. to believe however, and suspect that in reality not much thought has
  24. been given to the problem.
  25.  
  26. [moved GENERAL DATA STRUCTURES]
  27.  
  28. - Bruce D. Nilo
  29.  
  30. VP Software Systems
  31. ICTV
  32.  
  33. Date: Mon, 12 Oct 1992 13:46:03 -0500
  34. To: gnu-objc@prep.ai.mit.edu
  35. From: bradcox@sitevax.gmu.edu (Brad Cox)
  36. Subject: Action Expressions (exception handling, multitasking)
  37. Cc: Bruce Nilo <bruce@ictv.com>
  38.  
  39. In Re: Your mission, should you choose to accept it. . Bruce Nilo
  40. <bruce@ictv.com> writes
  41.  
  42. NeXT has half heartedly implemented an "Exception Handling" facility.  
  43. It basically consists of some macros, and the use of setjmp() and  
  44. longjmp(). An error handling facility should be specified,  
  45. implemented, and adhered to throughout the runtime system.
  46.  
  47. I agree wholeheartedly! I joined this list primarily to encourage
  48. extensions to Objective-C of precisely this nature.
  49.  
  50. I made substantial progress on the run-time part of this problem at Stepstone
  51. several years ago, but never managed to complete the language extensions
  52. (upwards compatible) to make them broadly useful. 
  53.  
  54. <Taskmaster Document> "Action expressions in Objective-C are similar to
  55. block expressions in Smalltalk, with differences to adapt to the
  56. constraints of stack-based languages like C. Action expressions are a way
  57. to express actions, or deferred computations; computations to be written at
  58. one place but invoked from another."
  59.  
  60. This document, which describes the (implemented) runtime components and
  61. (unimplemented) syntactic extensions, would be useful in considering
  62. language and/or runtime extensions. 
  63.  
  64. I'll be glad to email a copy to those planning to  work on such extentions. 
  65. (Please...only if you're planning to do actual work!)
  66. ===
  67. Brad Cox, Ph.D; Program on Social and Organizational Learning; George Mason
  68. University; Fairfax VA 22030; 703 691 3187 direct; 703 993 1142 reception;
  69. bradcox@sitevax.gmu.edu
  70. ---
  71. Information Age Consulting; 13668 Bent Tree Circle #203; Centreville VA
  72. 22020;           703 968 8229 home; 703 968 8798 fax; bradcox@infoage.com
  73.  
  74. Date: Thu, 15 Oct 92 04:59:00 -0400
  75. From: rms@gnu.ai.mit.edu (Richard Stallman)
  76. To: gsk@marble.com
  77. Cc: gnu-objc@prep.ai.mit.edu
  78. Subject: action expressions
  79.  
  80. GNU C supports nested functions.  In 2.3, these should work in
  81. Objective C.  This supplies most of the mechanism for creating action
  82. objects if you want them.  In fact, I expect one can go the rest of
  83. the way with macros, if you don't mind a different syntax:
  84.  
  85. #define make_action(name, body)
  86.  ({ id __temp = <create an empty action object>;
  87.     void name () { body }
  88.     <store &name into __temp>;
  89.     __temp; })
  90.  
  91. I've omitted the backslashes, and left stubs for where Objective C
  92. constructs are needed since I don't know them.
  93.  
  94. This technique requires you to give a unique name each time you write
  95. an action expression.  That could be avoided with an improvement in
  96. macro power.
  97.  
  98.